/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cageballcommon.messages;

import java.util.ArrayList;
import java.util.Collection;


/**
 *
 * @author kanonas
 */
public class Action {

    private transient Integer team;
    private Collection<PlayerAction> actions;

    public Action() {
    }

    public Action(Action action){
        this.team = action.getTeam();
        this.actions = action.getActions();
    }

    public Action(Collection<PlayerAction> actions) {
        this.actions = actions;
    }

    public Collection<PlayerAction> getActions() {
        return actions;
    }

    public void setActions(Collection<PlayerAction> actions) {
        this.actions = actions;
    }

    public void addAction(PlayerAction action){
        if(actions == null){
            actions = new ArrayList<PlayerAction>();
        }

        actions.add(action);
    }

    public int getTeam() {
        return team;
    }

    public void setTeam(int team) {
        this.team = team;
    }
}
